<template>
  <div class="head">
    <div class="emptyTop"></div>
    <div class="header">
      <!-- 两端对齐 -->
      <van-row class="headerAll" type="flex" justify="space-between" align="center">
        <van-col span="4"  class="leftImg" @click="goBack()">
          <img src="http://job.dayinyun.com/back.png" alt="">
        </van-col>
        <van-col span="16" justify="center" align="center" class="centerTitle">{{title}}</van-col>
        <van-col span="4" justify="end" align="end" class="rightTitle" @click="goSubtitle()">{{subtitle?subtitle:''}}</van-col>
      </van-row>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {

      }
    },
    props:["title","subtitle"],
    methods:{
      // 返回
      goBack(){
        this.$emit("goBack")
      },
      // 跳转另一个页面
      goSubtitle(){
        this.$emit("goSubtitle")
      },
    }
  }
</script>

<style lang='less' scoped>
  @import (reference) url(../../assets/less/common);
  .head{
    width:100%;
    height:1.38rem;
    position: fixed;
    top:0;
    left:0;
    right:0;
    z-index:100;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    .emptyTop{
      width:100%;
      height:0.5rem;
      background: #000000;
    }
    .header{
      width:100%;
      height:0.88rem;
      padding: 0 0.3rem ;
      box-sizing: border-box;
      background: #000000;
      border-bottom: 0.02rem solid rgba(102,102,102,0.4);
      margin-top:-0.02rem;
      .headerAll{
        width:100%;
        height:0.88rem;
        .leftImg{
          height:0.28rem;
          img{
            width:0.28rem;
            height:0.28rem;
          }
        }
        .centerTitle{
          font-size:@fontSize40;
          font-family:@fontFamily400;
          font-weight:@fontWeight500;
          line-height:0.4rem;
          color:#FFFFFF;
        }
        .rightTitle{
          font-size:@fontSize28;
          font-family:@fontFamily400;
          font-weight:@fontWeight400;
          line-height:0.4rem;
          color:#FFFFFF;
        }
      }
    }
  }

</style>
